﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application.Entity;

/// <summary>
/// 计划清单
/// </summary>
[Tenant("1300000000001")]
[IncreTable]
[SugarTable("plan_List", "计划清单")]
[SugarIndex("index_{table}_Ch", nameof(Ch), OrderByType.Asc)]
[SugarIndex("index_{table}_Fd", nameof(Fd), OrderByType.Asc)]
[SugarIndex("index_{table}_ClassName", nameof(ClassName), OrderByType.Asc)]
[SugarIndex("index_{table}_WorkAreaId", nameof(WorkAreaId), OrderByType.Asc)]
//// 复合索引
//[SugarIndex("index_{table}_Ch_Fd_ClassName", $"{nameof(Ch)},{nameof(Fd)},{nameof(ClassName)}", OrderByType.Asc)]
//[SugarIndex("index_{table}_ClassName_WorkAreaId", $"{nameof(ClassName)},{nameof(WorkAreaId)}", OrderByType.Asc)]
public partial class PlanList : EntityBaseTenantOrgDel
{
    /// <summary>
    /// 船号
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "Ch", ColumnDescription = "船号", Length = 30)]
    public virtual string Ch { get; set; }
    
    /// <summary>
    /// 分段
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "Fd", ColumnDescription = "分段", Length = 30)]
    public virtual string Fd { get; set; }
    
    /// <summary>
    /// 分类
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "ClassName", ColumnDescription = "分类")]
    public virtual long ClassName { get; set; }
    
    /// <summary>
    /// 区域
    /// </summary>
    [SugarColumn(ColumnName = "WorkAreaId", ColumnDescription = "区域", Length = 32)]
    public virtual long? WorkAreaId { get; set; }
    
    /// <summary>
    /// 劳务队
    /// </summary>
    [SugarColumn(ColumnName = "Team", ColumnDescription = "劳务队", Length = 32)]
    public virtual string? Team { get; set; }
    
    /// <summary>
    /// 计划开工
    /// </summary>
    [SugarColumn(ColumnName = "PlanStart", ColumnDescription = "计划开工")]
    public virtual DateTime? PlanStart { get; set; }
    
    /// <summary>
    /// 计划完工
    /// </summary>
    [SugarColumn(ColumnName = "PlanEnd", ColumnDescription = "计划完工")]
    public virtual DateTime? PlanEnd { get; set; }
    
    /// <summary>
    /// 实际开工
    /// </summary>
    [SugarColumn(ColumnName = "ActualStart", ColumnDescription = "实际开工")]
    public virtual DateTime? ActualStart { get; set; }
    
    /// <summary>
    /// 实际完工
    /// </summary>
    [SugarColumn(ColumnName = "ActualEnd", ColumnDescription = "实际完工")]
    public virtual DateTime? ActualEnd { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 128)]
    public virtual string? Remark { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [SugarColumn(ColumnDescription = "状态")]
    public FinishStatusEnum Status { get; set; } = FinishStatusEnum.UnFinish;

    /// <summary>
    /// 开工延期原因
    /// </summary>
    [SugarColumn(ColumnName = "StartDelayReason", ColumnDescription = "开工延期原因", Length = 500)]
    public virtual string? StartDelayReason { get; set; }

    /// <summary>
    /// 完工延期原因
    /// </summary>
    [SugarColumn(ColumnName = "EndDelayReason", ColumnDescription = "完工延期原因", Length = 500)]
    public virtual string? EndDelayReason { get; set; }
}
